<!--
  车道表编辑页面
  User: zsj
  Date: 2020-04-08
-->
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >

<!-- BEGIN FORM-->
<div class="portlet light">
    <div class="portlet-title">
        <div class="caption">
            <span class="caption-subject font-red-sunglo bold uppercase">车道表查看</span>
            <span class="caption-helper">查看一条车道表数据</span>
        </div>
    </div>
    <div class="portlet-body form">
        <!-- BEGIN FORM-->
        <form action="#" class="form-horizontal" id="edit-module">
            <div class="form-body">

                    <!--  字段信息-->
                        <div class="form-group hide">
                            <label class="col-md-3 control-label"></label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" disabled class="form-control" required name="id" th:value="${data['id']}" placeholder="">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 停车场id 字段信息-->
                        <div class="form-group hide">
                            <label class="col-md-3 control-label">停车场id</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required minlength="2" name="parkId" th:value="${data['parkId']}" placeholder="停车场id">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 停车场名称 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">停车场名称</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" readonly required minlength="2" name="parkName" th:value="${data['parkName']}" placeholder="停车场名称">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 车道名称 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">车道名称</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" readonly required minlength="2" name="roadName" th:value="${data['roadName']}" placeholder="车道名称">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 车道编号 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">车道编号</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" readonly required minlength="2" name="roadCode" th:value="${data['roadCode']}" placeholder="车道编号">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 岗亭编号 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">岗亭编号</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" readonly required minlength="2" name="sentryBoxCode" th:value="${data['sentryBoxCode']}" placeholder="岗亭编号">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 进出类型（0-进车，1-出车） 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">进出类型</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <select class="form-control" required name="status" disabled>
                                            <option value="0" th:selected="${data['directionType'] == 0}">进车</option>
                                            <option value="1" th:selected="${data['directionType'] == 1}">出车</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 终端IP 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">终端IP</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" readonly required minlength="2" name="terminalIp" th:value="${data['terminalIp']}" placeholder="终端IP">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 终端名称 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">终端名称</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" readonly required minlength="2" name="terminalName" th:value="${data['terminalName']}" placeholder="终端名称">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 摄像头IP 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">摄像头IP</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required minlength="2" name="cameraIp" th:value="${data['cameraIp']}" placeholder="摄像头IP">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 摄像头唯一编号 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">摄像头唯一编号</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" readonly required minlength="2" name="cameraNumber" th:value="${data['cameraNumber']}" placeholder="摄像头唯一编号">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 摄像头端口号 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">摄像头端口号</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="number" class="form-control" readonly required  name="cameraPort" th:value="${data['cameraPort']}" placeholder="摄像头端口号">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 摄像头登录账号 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">摄像头登录账号</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" readonly required minlength="2" name="cameraAccount" th:value="${data['cameraAccount']}" placeholder="摄像头登录账号">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 摄像头登录密码 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">摄像头登录密码</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" readonly required minlength="2" name="cameraPassword" th:value="${data['cameraPassword']}" placeholder="摄像头登录密码">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 是否启用摄像头（0-禁止 1-启用） 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">是否启用摄像头</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <select class="form-control" required name="status" disabled>
                                            <option value="0" th:selected="${data['cameraOpenStatus'] == 0}">禁止</option>
                                            <option value="1" th:selected="${data['cameraOpenStatus'] == 1}">启用</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 临时车是否允许入场（0-禁止 1-允许 ） 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">临时车是否允许入场</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <select class="form-control" required name="status" disabled>
                                            <option value="0" th:selected="${data['openStatus'] == 0}">禁止</option>
                                            <option value="1" th:selected="${data['openStatus'] == 1}">允许</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 区域ID 字段信息-->
                        <div class="form-group hide">
                            <label class="col-md-3 control-label">区域ID</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required minlength="2" name="customOne" th:value="${data['customOne']}" placeholder="区域ID">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 区域名称 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">区域名称</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required minlength="2" readonly name="customTwo" th:value="${data['customTwo']}" placeholder="区域名称">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 品牌 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">品牌</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" readonly required minlength="2" name="customThree" th:value="${data['customThree']}" placeholder="品牌">
                                    </div>
                                </div>
                            </div>
                        </div>

                    <!-- 型号（包含版本号） 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">型号（包含版本号）</label>
                            <div class="col-md-4">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" readonly required minlength="2" name="customFour" th:value="${data['customFour']}" placeholder="型号（包含版本号）">
                                    </div>
                                </div>
                            </div>
                        </div>

            </div>
            <!--<div class="form-actions">
                <div class="row">
                    <div class="col-md-6">
                        <div class="row">
                            <div class="col-md-offset-3 col-md-9">
                               &lt;!&ndash; <button type="button" class="btn green" onclick="edit();">保存</button>&ndash;&gt;
                               &lt;!&ndash; <button type="button" class="btn default" onclick="layer.close(layer_editModule);">关闭</button>&ndash;&gt;
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6"> </div>
                </div>
            </div>-->
        </form>
        <!-- END FORM-->
    </div>
</div>

<script>

    $(function(){
        //初始化页面
        initPage();
    });

    function edit(){
        let param = tools.formParams("edit-module");
        if(tools.valid("edit-module")){
            tools.post("/road/update",param,function(data){
                if(data.success){
                    layer.msg('修改成功', {icon: 1,time:1000},function(){
                        //刷新列表页面
                        toPage(null);
                        //关闭弹窗
                        layer.close(layer_editModule);
                    });
                }else{
                    tools.errorTip(data);
                }
            });
        }
    }

</script>
</html>